-
Notifications
You must be signed in to change notification settings - Fork 344
Add Primitive Picking sample #539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Writes the primitive_index to a secondary render target and uses that to highlight the primitive that the pointer is over on subsequent frames.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
I think it might be nice to add a few more comments in the code. I also notice lots of inconsistent formatting like a: b
vs a : b
and a + b
vs a+b
. I don't mind but just thought I'd point it out. npm run lint
though does complain about some things though.
Updated with more comments all around, as well as addressing your feedback. I think the formatting issues you pointed out were in the WGSL files, which is why they weren't showing up for my with lint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great sample. Thanks @toji!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Co-authored-by: François Beaufort <[email protected]>
Writes the
primitive_index
to a secondary render target and uses that to highlight the primitive that the pointer is over on subsequent frames. Also includes a mode that visualizes the primitive index. Used as a (somewhat contrived) example of using theprimitive_index
builtin.This was based on the deferred shading sample, but has been modified significantly.